package org.jeecg.modules.demo.zc.controller;

import org.jeecg.modules.demo.zc.entity.Store2;
import org.jeecg.modules.demo.zc.service.Store2Service;
import org.jeecg.modules.demo.zc.util.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description: TODO
 * @author: scott
 * @date: 2022年03月26日 19:30
 */
@RestController
@RequestMapping(value = "/store2",produces = "application/json; charset=utf-8")
public class Store2Controller {

    @Autowired
    Store2Service store2Service;

    @RequestMapping("/selectAll")
    public CommonResult selectAll(){
        List<Store2> store2List = store2Service.selectAll();

        if (store2List != null){

            return new CommonResult(200,"查询销售成功",store2List);
        }else{
            return new CommonResult(404,"未查询到数据");
        }
    }

}


